//登录接口需要携带参数ts类型
export interface loginFormData {
  username: string
  password: string
}

//定义全部接口返回数据拥有的ts类型
export interface ResponseData {
  code: number
  message: string
  ok: boolean
}

//定义登录接口返回数据类型
export interface loginResponseData extends ResponseData {
  data: string
}

//定义获取用户信息返回数据类型
export interface userInfoResponseData extends ResponseData {
  data: {
    routes: string[]
    buttons: string[]
    roles: string[]
    name: string
    avatar: string
  }
}

/*
export interface loginForm {
  username: string
  password: string
}

//登录接口的返回类型
export interface loginResponseData {
  code: number
  data: dataType
}
//data项的类型
interface dataType {
  token?: string
  message?: string
}

//定义返回用户信息相关的数据类型
interface userInfo {
  checkUser: {
    userId: number
    avatar: string
    username: string
    password: string
    desc: string
    roles: string[]
    buttons: string[]
    routes: string[]
    token: string
  }
}
export interface userResponseData {
  code: number
  data: userInfo
}
*/
